#!/bin/bash

#set -x

##  This is a script to run the License Manager java app.
##  This script is invoked every time the HMC is started.
##  If the user accepts the terms of the license, the app will 
##  create a file in /opt/hsc/data.  This directory is checked
##  for the existence of that file each time the HMC is
##  started.  
##   

if [ -f /opt/hsc/data/.license_accepted ]
then 
#   echo "License Agreement already signed"
    exit 0
else
#   echo "run License Manager"
    export PATH=/opt/IBMJava2-13/jre/bin:$PATH
    export CLASSPATH=/usr/websm/codebase/pluginjars/hmcdebug.jar:/opt/hsc:/opt/hsc/data:/usr/websm/codebase/wsm.jar:$CLASSPATH
    java -Xms20m -Xmx128m com.ibm.hsc.common.util.LicenseManager
fi
exit 0
